package com.example.java_service;

import com.example.java_dao.UserDao;
import com.example.java_pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.ComponentScan;

import java.util.List;

public interface UserService {
    /**
     * 保存
     *
     * @param user
     * @return
     */
    public boolean save(User user);

    /**
     * 修改
     *
     * @param user
     * @return
     */
    public boolean update(User user);

    /**
     * 删除
     *
     * @param id
     * @return
     */
    public boolean delete(Integer id);

    /**
     * 查找
     *
     * @param id
     * @return
     */
    public User findById(Integer id);

    /**
     * 查找所有
     *
     * @param
     * @return
     */
    public List<User> findAll();
    /**
     * 登录
     *
     * @param
     * @return
     */
    public User findByName(String name);
    public User login(String username,String password);
}
